EUDTrig v1.2
By O)FaRTy1billion (aka FaRTy[MM])

--- I. About EUDs ---
EUD stands for 'Extended Unit Death'.
EUDs are simply a buffer overflow  you put in a really big number
for unit, and StarCraft reads past the end of the death count table
allowing you to read arbitrary data.

At one point in time, EUDs were able to actually write to memory. But,
as this could be dangerous, Blizzard removed this feature leaving us
with the mostly useless EUD Conditions. EUDTrig supports older
versions, allowing you to downgrade and use EUD Actions once again.
EUD Actions work with 1.12b, and there exists lots of memory addresses
for 1.12b in a list (that I currently have misplaced. :P)


--- II. Finding EUDs ---
Using a memory searcher (such as ArtMoney), you just search and filter
for a known (or partially known) value until you narrow the results
down to a few. After that, you just test and make sure that your newly
found address is the correct one (maybe increment it and see what
happens in StarCraft.)

Once you have found the memory address you want to use, just stick it
into EUDTrig and find the player number and unit ID.


--- III. Using EUDTrig ---
EUDTrig is very simple; that shouldn't be hard to assume when looking
at it. Most of this is covered in the Help dialog, but this will fill
in a few minor details.

EUDTrig accepts both hexadecimal (0-F) numbers, and decimal numbers
(0-9). Usually when you get a memory address, it will be in hex. To
input a decimal number, simply put the number as you see it. For a hex
number, you must put a preceeding '0x' (or the VB prefix '&H'.)

Numbers returned by EUDTrig's calculations will be decimal by default.
If you want them in hex, you must check Options->Output Hex (or hit
Ctrl+H.) This option will be saved when you close EUDTrig.

If you would like to use an older version of StarCraft, then you can
go to Options->Version Offset ([current]) and choose the version you
would like to use. Available versions are: 1.12b, 1.13f, 1.14, and
1.15.0-.2. If the version you want is not listed, then you can find it
(see V. Finding Version Offsets) and input it with the 'Other' option.
The selected version offset will also be saved when you close EUDTrig.

Now for actually using the calculator.

Memory Offset - This is where you put your memory offset. Not to
difficult, eh?

Object ID/Len. - Sometimes the memory offset you use is simply a
pointer to the beginning of a table of values (such as death counters
themselves.) The ID (text box) will be where you specify the ID. This
can be left blank and is defaulted as 0 (0 is added to the memory
offset.) The length (dropdown box) is how many bytes the value is.

Down/Up buttons - These perform the calculations. Down will calculate
player number and Unit ID from the memory offset. Up will do the
reverse.

Player Number - This is the player that is used when using this EUD.
Player 9-12 can be read, but cannot be written to. If you are using a
hex editor to add these, remember that the player numbers are stored as
0-based (meaning Player 1 = 00, Player 2 = 01, Player 3 = 02, etc.)

Unit ID - This shows the ID of the unit to use when using your EUD.
Using the Signed/Unsigned box, you can change whether or not the output
value can or can't be negative (some things use signed numbers (such as
StarForge) and other things use unsigned. EUDTrig's exporter should
accept both.)


--- IV. Using the Exporter ---
This is really just a very simple trigger editor that does the bare
minimum for EUDs. This shouldn't be too difficult.

Conditions/Actions:
Player/Unit ID - info from the EUDTrig output.

Compare/Modifier - Comparison and modifier for the Death condition/
action.

Value - Number to compare deaths to/modify with.

Add - Adds the condition/action to the respective list for StarForge/
StarEdit (*.trg).

Output:
StarForge/StarEdit (*.trg) - Output for the 'Add' button. StarEdit is
mainly for reference (and is what the Expoter uses.)

Save - Saves the current output as a .trg file.

Reset - Clears StarForge and StarEdit output.


--- V. Finding Version Offsets ---
So you want to use an unsupported version (or a new patch came out.)
This little guide will show you how simple it can be.

Simply make a map that allows you to do a controlled incrementing of
deaths for Player 1 Marine (player 0, unit 0.) Such as a beacon to add
1 death for Player 1 Marine, or a constant spawning of Player 1 Marines
that get killed. To help narrow it down, you must also add something
to increment kills (if you are killing the marine) and force/all player
deaths for Player 1 Marine.

Once you have the offset, you must verify it. Make a trigger to read if
Player 1 Marine is some random value. Use the memory searcher to edit
the offset to that value. If whatever action takes place, then you've
got the correct memory address.


--- VI. Version History ---
1.2.0  - Fixed EUD max bounds (now supports for Unit 65535 to go to 
         player 256.)
       - Fixed *.trg exporter to use 1-based player IDs.

1.1.1  - Updated for 1.15.2 (Again, the same as 1.15.0)
1.1.0  - Updated for 1.15.1 (It's the same as 1.15.0. :mad:)
       - Versions and offsets now stored in EUD.ini for easy updating.
       - Signed/Unsigned works better.
       - Added errors for when the address is less than the base address
         or larger than can be reached with EUDs.
       - Calculation bugs fixed (at least I hope so.)
       - Object Length and Signed/Unsigned now saved in EUD.ini.

1.0.1  - Attempted to fix a few calculation bugs.
1.0    - Inital Production & Release.

--- VII. Disclaimer ---
I will not be held responsible for any damage or losses to you, your
computer, or belongings. This program is tested and works. Use at your
own risk! This program is neither sponsered nor indorsed by Blizzard
Entertainment. They are gods and own the world of StarCraft. Yeah, we
get it.


--- VIII. Let's All Go to the Lobby! ---
"Let's all go the lobby
Let's all go the lobby
Let's all go the lobby
To get ourselves a treat.

Delicious things to eat
The popcorn can't be beat
The sparkling drinks are just dandy
The chocolate bars and the candy

So let's all go to the lobby
To get ourselves a treat
Let's all go to the lobby
To get ourselves a treat
Let's all go to the lobby
To get ourselves a treat."